from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
from rest_framework import viewsets
from rest_framework.parsers import JSONParser
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from rest_framework.views import APIView

from idcs.models import Idc
from idcs.serializers import IdcSerializer

class IdcViewset(viewsets.ModelViewSet):
    '''
        retriver: 返回指定IDC信息
        list: 返回IDC列表
        create :新增IDC
        update: 修改IDC
        destroy: 删除
        '''
    queryset = Idc.objects.all()
    serializer_class = IdcSerializer